← Back to issue list

Files in path to snapcraft.yaml are excluded in source directive

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2015327
Type
issue
State
open
Author
~kian-parvin
Labels
Created
2023-04-05 07:40:32.560668+00:00
Updated
2023-04-05 07:40:32.560668+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

Hi, I have a potential bug when building a Snap where some files from my source directory are missing when I build the snap. I have a project with a similar directory structure to the below where my snaps are in a subdirectory. my-app/ ├─ internal/ ├─ snaps/ │ ├─ core20/ │ │ ├─ snapcraft.yaml │ ├─ core22/ │ │ ├─ snapcraft.yaml ├─ src/ │ ├─ stuff.go ├─ .gitignore ├─ Makefile In my snapcraft.yaml files I have a directive `source: ../..` and the problem I'm encountering is that when I build, specifically the core22 snap, all the files in snap/ are not present inside the folder `parts/<part-name>/src`. I noticed this because I use `git describe --tags --dirty` to get the version info for my snap but each build of the core22 snap was output a version with "-dirty" appended. Debugging the build I can see that all the files in snap/ are missing and git thinks the directory has been modified. Testing Info: I ran the build inside a lxd container with the command `sudo snapcraft --enable-manifest --destructive-mode` I tested this with the following pairings: Snapcraft 7.3.1 and Core22: Bug present Snapcraft 7.3.1 and Core20: No issue Snapcraft 4.8 and Core22: No issue

Evaluation history

No evaluation history available.